use :: libc;
extern "C" {
    fn tolower(_: i32) -> i32;
}
#[no_mangle]
pub extern "C" fn string_hash(mut string: *mut libc::c_void) -> u32 {
    let mut result: u32 = 5381 as i32 as u32;
    let mut p: *mut u8 = 0 as *mut u8;
    p = string as *mut u8;
    while (unsafe { *p }) as i32 != '\0' as i32 {
        result = (result << 5 as i32)
            .wrapping_add(result)
            .wrapping_add((unsafe { *p }) as u32);
        p = unsafe { p.offset(1) };
        p;
    }
    return result;
}
#[no_mangle]
pub extern "C" fn string_nocase_hash(mut string: *mut libc::c_void) -> u32 {
    let mut result: u32 = 5381 as i32 as u32;
    let mut p: *mut u8 = 0 as *mut u8;
    p = string as *mut u8;
    while (unsafe { *p }) as i32 != '\0' as i32 {
        result = (result << 5 as i32)
            .wrapping_add(result)
            .wrapping_add((unsafe { tolower(*p as i32) }) as u32);
        p = unsafe { p.offset(1) };
        p;
    }
    return result;
}
